package com.fwx.springcloud.controller;

import com.fwx.springcloud.server.PaymentOpenFeignService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author : fengwenxiang
 * @date : 2022/6/26 0:30
 * @description：
 */
@RestController
public class OrderOpenFeignController {
    @Autowired
    private PaymentOpenFeignService paymentOpenFeignService;

    @RequestMapping("/consumer/order/feign")
    public String getOrderLB(){
        return paymentOpenFeignService.getlb();
    }
    @RequestMapping("/consumer/feign/timeout")
    public String getTimeout(){
        //OpenFeign客户端一般默认等待1秒钟
        return paymentOpenFeignService.getTimeout();
    }
}
